package com.example.dakotanews.dto;

import com.example.dakotanews.entity.Issue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @description 用户属性信息中的关注话题的信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FollowIssueDTO {

    private Integer id;
    private String name;
    private String description;
    private int newsCount;
    private int blogCount;
    private int followers;

    // newsCount和blogCount需要单独统计赋值
    public FollowIssueDTO(Issue issue) {
        this.id = issue.getId();
        this.name = issue.getIssueName();
        this.description = issue.getIntroduction();
        this.followers = issue.getFollowerNum();
    }
}
